<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<style type="text/css">
ul.searchContent {
    display: block;
    height: 100px;
    overflow: hidden;
}
</style>
<form id="pagerForm" method="post" action="${pageContext.request.contextPath}/member/list">
    <input type="hidden" name="pageNum" value="1" />  
    <input type="hidden" name="numPerPage" value="${collectionTO.pageSize}" />
    <input type="hidden" name="memberName" value="${searchCriteria.memberName}" />
    <input type="hidden" name="memberId" value="${searchCriteria.memberId}" />
    <input type="hidden" name="companyId" value="${searchCriteria.companyId}" />
    <input type="hidden" name="companyName" value="${searchCriteria.companyName}" />
    <input type="hidden" name="hqId" value="${searchCriteria.hqId}" />
    <input type="hidden" name="hqName" value="${searchCriteria.hqName}" />
    <input type="hidden" name="stationId" value="${searchCriteria.stationId}" />
    <input type="hidden" name="stationName" value="${searchCriteria.stationName}" />
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/member/list" method="post">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>会员id</label>
				<input style="width:75px" type="text" name="memberId" value="${searchCriteria.memberId}" />
			</li>
			<li>
				<label>会员名称</label>
				<input style="width:75px" type="text" name="memberName"  value="${searchCriteria.memberName}" />
			</li>
			<li>
				<label>企业id</label>
				<input style="width:75px" type="text" name="" value="${searchCriteria.companyId}" />
			</li>
			<li>
				<label>企业名称</label>
				<input style="width:75px" type="text" name="companyName" value="${searchCriteria.companyName}" />
			</li>
		</ul>
		<ul class="searchContent">
			<li>
				<label>总部id</label>
				<input style="width:75px" type="text" name="hqId" value="${searchCriteria.hqId}" />
			</li>
			<li>
				<label>总部名称</label>
				<input style="width:75px" type="text" name="hqName" value="${searchCriteria.hqName}" />
			</li>
			<li>
				<label>油站id</label>
				<input style="width:75px" type="text" name="stationId" value="${searchCriteria.stationId}" />
			</li>
			<li>
				<label>油站名称</label>
				<input style="width:75px" type="text" name="stationName" value="${searchCriteria.stationName}" />
			</li>
		</ul>
		<div class="subBar">
			<ul>
				<li>
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">检索</button>
						</div>
					</div>
				</li>
				<!-- <li><a class="button" href="demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li> -->
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
	 			<option value="10" <c:if test="${collectionTO.pageSize==15}">selected</c:if>>10</option>
			</select>
			<span>条，共${totalCount}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="${totalCount}" numPerPage="${collectionTO.pageSize}" pageNumShown="10" currentPage="${collectionTO.pageNo}"></div>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="80">会员id</th>
				<th width="80">会员名</th>
				<th width="80">企业id</th>
				<th width="80">企业类型</th>
				<th width="80">企业名</th>
				<th width="80">会员类型</th>
				<th width="80">总部id</th>
				<th width="80">总部名称</th>
				<th width="80">等级id</th>
				<th width="80">等级名称</th>
				<th width="80">油站编码</th>
				<th width="80">站点名称</th>
				<th width="80">状态</th>
				<th width="80">备注</th>
				<th width="80">创建时间</th>
				<th width="80">电话</th>
				<th width="80">车牌</th>
				<th width="80">出生日期</th>
				<th width="80">身份证</th>
				<th width="80">操作</th>
				
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${collectionTO.list}" var="bean" varStatus="status">
				<tr target="sid_user" rel="1">
					<td>${bean.memberId}</td>
					<td>${bean.memberName}</td>
					<td>${bean.companyId}</td>
					<td>${bean.companyType}
						<c:choose>
							<c:when test="${bean.companyType == 1}">
								散户
							</c:when>
							<c:when test="${bean.companyType == 2}">
								余额
							</c:when>
							<c:when test="${bean.companyType == 3}">
								总账
							</c:when>
						</c:choose>
					</td>
					<td>${bean.companyName}</td>
					<td>
						<c:choose>
							<c:when test="${bean.memberType == 1}">
								企业子帐号
							</c:when>
							<c:when test="${bean.memberType == 2}">
								企业总账号
							</c:when>
						</c:choose>
					</td>
					<td>${bean.hqId}</td>
					<td>${bean.hqName}</td>
					<td>${bean.hqMemberGradeId}</td>
					<td>${bean.hqMemberGradeName}</td>
					<td>${bean.stationId}</td>
					<td>${bean.stationName}</td>
					<td>
						<c:choose>
							<c:when test="${bean.status == 1}">
								正常
							</c:when>
							<c:when test="${bean.status == 0}">
								冻结
							</c:when>
							<c:otherwise>
								注销
							</c:otherwise>
						</c:choose>
					</td>
					<td>${bean.memo}</td>
					<td>
						<fmt:formatDate value="${bean.createdTime}" type="date" dateStyle="long" />
					</td>
					<td>${bean.phoneNum}</td>
					<td>${bean.licensePlate}</td>
					<td>
						<fmt:formatDate value="${bean.birthday}" type="date" dateStyle="long" />
					</td>
					<td>${bean.idCard}</td>
					<td>
						<c:if test="">
							
						</c:if>
						<c:choose>
							<c:when test="${bean.status == 1}">
								<a href="${pageContext.request.contextPath}/member/freeze?memberId=${bean.memberId}" target="ajaxTodo" >冻结</a>
							</c:when>
							<c:otherwise>
								<span>冻结</span>
							</c:otherwise>
						</c:choose>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</div>
